package com.sagframe.sagacity.sqltoy.plus.conditions;


import com.sagframe.sagacity.sqltoy.plus.conditions.query.LambdaQueryWrapper;
import com.sagframe.sagacity.sqltoy.plus.conditions.query.QueryWrapper;
import com.sagframe.sagacity.sqltoy.plus.conditions.update.LambdaUpdateWrapper;
import com.sagframe.sagacity.sqltoy.plus.conditions.update.UpdateWrapper;
import com.sagframe.sagacity.sqltoy.plus.multi.delete.LambdaDelete;
import com.sagframe.sagacity.sqltoy.plus.multi.delete.LambdaMultiDeleteWrapper;
import com.sagframe.sagacity.sqltoy.plus.multi.delete.MultiDeleteWrapper;
import com.sagframe.sagacity.sqltoy.plus.multi.delete.StringDelete;
import com.sagframe.sagacity.sqltoy.plus.multi.model.LambdaColumn;
import com.sagframe.sagacity.sqltoy.plus.multi.model.StrColumn;
import com.sagframe.sagacity.sqltoy.plus.multi.query.LambdaMultiQueryWrapper;
import com.sagframe.sagacity.sqltoy.plus.multi.query.LambdaQuery;
import com.sagframe.sagacity.sqltoy.plus.multi.query.MultiQueryWrapper;
import com.sagframe.sagacity.sqltoy.plus.multi.query.StringQuery;
import com.sagframe.sagacity.sqltoy.plus.multi.update.LambdaMultiUpdateWrapper;
import com.sagframe.sagacity.sqltoy.plus.multi.update.LambdaUpdate;
import com.sagframe.sagacity.sqltoy.plus.multi.update.MultiUpdateWrapper;
import com.sagframe.sagacity.sqltoy.plus.multi.update.StringUpdate;

/**
 * 条件对象获取
 */
public final class Wrappers<T> {

    public static <T> QueryWrapper<T> wrapper(Class<T> entityClass) {
        return new QueryWrapper<T>(entityClass);
    }

    public static <T> LambdaQueryWrapper<T> lambdaWrapper(Class<T> entityClass) {
        return new LambdaQueryWrapper<T>(entityClass);
    }

    public static <T> UpdateWrapper<T> updateWrapper(Class<T> entityClass) {
        return new UpdateWrapper<T>(entityClass);
    }

    public static <T> LambdaUpdateWrapper<T> lambdaUpdateWrapper(Class<T> entityClass) {
        return new LambdaUpdateWrapper<T>(entityClass);
    }

    public static <T> LambdaQuery<LambdaMultiQueryWrapper<T>, LambdaColumn> lambdaMultiWrapper(Class<T> toClass) {
        return new LambdaMultiQueryWrapper<>(toClass);
    }

    public static <T> StringQuery<MultiQueryWrapper<T>, StrColumn> multiWrapper(Class<T> toClass) {
        return new MultiQueryWrapper<>(toClass);
    }

    public static LambdaUpdate<LambdaMultiUpdateWrapper> lambdaUpdateMultiWrapper() {
        return new LambdaMultiUpdateWrapper();
    }

    public static StringUpdate<MultiUpdateWrapper> updateMultiWrapper() {
        return new MultiUpdateWrapper();
    }

    public static LambdaDelete<LambdaMultiDeleteWrapper> lambdaDeleteMultiWrapper() {
        return new LambdaMultiDeleteWrapper();
    }

    public static StringDelete<MultiDeleteWrapper> deleteMultiWrapper() {
        return new MultiDeleteWrapper();
    }
}
